package com.polaris.live.popup.party

import android.content.Context
import com.lxj.xpopup.core.CenterPopupView
import com.polaris.live.R
import com.polaris.live.common.ext.setOnSingleClickListener
import com.polaris.live.databinding.PopupInvitingSeatBinding

/**
 *  邀请上座
 * @author Created by 天晴 on 2024/2/27 19:18
 * @since 1.0.0
 **/
class InvitingSeatPopup(
    context: Context,
    private val onOk: () -> Unit,
) : CenterPopupView(context) {
    private lateinit var mBinding: PopupInvitingSeatBinding
    override fun getImplLayoutId(): Int {
        return R.layout.popup_inviting_seat
    }


    override fun onCreate() {
        super.onCreate()
        mBinding = PopupInvitingSeatBinding.bind(popupImplView)

        mBinding.ok.setOnSingleClickListener {
            dismiss()
            onOk.invoke()
        }
        mBinding.cancel.setOnSingleClickListener {
            dismiss()
        }
    }
}